/*
 * Created on 02-dic-2004
 *
 */
package guru.mercurio.data;



/**
 * @author cobach
 *
 */
public class CargaInicial {
    /*
    public static void main(String[] argv){
        try{
            
            if(argv.length != 1) {
                System.err.println("Please provide the path to the configuration file");
                return;
              }


        FileInputStream is = new FileInputStream(argv[0]);
        Properties prop = new Properties();
        prop.load(is);
		
        String driver=prop.getProperty("driver");
        String dbmsURL=prop.getProperty("dbmsURL");
        String username=prop.getProperty("username");
        String password=prop.getProperty("password");

        System.out.println("driver: "+driver);
        System.out.println("dbmsURL: "+dbmsURL);
        System.out.println("username: "+username);
        System.out.println("password: "+password);

        
        DataManager dm=new DataManager(driver,dbmsURL,username,password);    
        PassportDataManager pdm=new PassportDataManager(dm);
        ChannelDataManager cdm=new ChannelDataManager(dm);

        pdm.createPassport("canal", "gorila", "Twindivision.com", "soporte@twindivision.com", 58, 416, 6210713);
        pdm.createPassport("tsj", "gorila", "Roberto Angulo", "board@twindivision.com", 58, 416, 6210713);
        pdm.createPassport("multinacional", "twin", "Giovanni Guglielmelli", "gguglielmelli@multinacional.com.ve", 58, 416, 6210713);
        pdm.createPassport("avior", "gorila", "Yamari Vasquez", "vasquezy@avior.com.ve", 58, 416, 6210713);
        pdm.createPassport("demo", "gorila", "Yamari Vasquez", "vasquezy@avior.com.ve", 58, 416, 6210713);
        pdm.createPassport("nochedigital", "gorila", "Andres Gonzalez", "master@nochedigitial.com", 58, 414, 6134445);
        pdm.createPassport("conredsis", "gorila", "Jenny Rodriguez", "jenny.rodriguez@conredsis.com", 58, 212, 7616666);
        pdm.createPassport("bancar", "gorila", "Eduardo Vidal", "evidal@bancaribe.com.ve", 58, 212, 5055429);
        pdm.createPassport("zoom", "twin", "Jackeline Candal", "jcandal@grupozoom.com", 58, 212, 2046839);
        pdm.createPassport("bnc", "twin", "Angel Buendia","abuendia@banconacionaldecredito.com.ve", 58, 212, 5765884);
        pdm.createPassport("seghz", "twin", "Ernesto Contreras", "ernesto.contreras@seguroshorizonte.com", 58, 212, 9051189);
        pdm.createPassport("mc", "gorila", "Moises Ramos", "mramos@twindivision.com", 58, 416, 6207969);
        pdm.createPassport("yesi", "gorila", "Yesenia Ruiz", "yecaru@cantv.net", 58,416,4362820);
        pdm.createPassport("segmer", "gorila", "Jesus Martell", "jmartell@segurosmercantil.com", 58, 212, 2762451);
        
        
        
        //Configuracion de Aplicaciones
        // setApp(pasaporte,url,llave)
        
        pdm.setApp("cesar", "cgi", "http://mercurio.twindivision.com/production/22625.txt","mikey");
        pdm.setApp("tsj", "cgi", "http://206.48.6.86:8080/mercurio/recibeSMS","clave");
        pdm.setApp("multinacional", "cgi", "http://64.76.64.187:8085/multi/index.jsp","clave");
        pdm.setApp("avior", "cgi", "http://200.44.120.148:8200/mercurio/recibeSMS","clave");
        pdm.setApp("demo", "cgi", "http://www.twindivision.com/demo/oz/grabar.php","clave");
        pdm.setApp("nochedigital", "cgi", "http://www.nochedigital.com/pagina_sms/grabar.php","clave");
        pdm.setApp("conredsis", "ws", "http://200.74.217.211:81/SMS_Dispatcher/Receptor.asmx?WSDL","9853");
        pdm.setApp("bancar", "cgi", "http://mercurio.twindivision.com/respuesta/standard.php","clave");
        pdm.setApp("zoom", "cgi", "http://www.grupozoom.com/sms/index.php","magico");
        pdm.setApp("bnc", "cgi", "http://206.48.96.234:8181/mercurio/recibeSMS","mercurio");
        pdm.setApp("seghz", "cgi", "http://200.44.114.163:8181/mercurio/recibeSMS","mercurio");
        pdm.setApp("mc", "cgi", "http://206.48.96.234:8181/mercurio/recibeSMS","twin");
        pdm.setApp("yesi", "cgi", "http://www.twindivision.com","twin");
        pdm.setApp("segmer", "cgi", "http://200.3.3.162:8888/Mercurio/recibeMercurio","twin");
        

        
        //Operadores y puertos
        // createOperator(nombre-corto,nombre-largo,codigo-pais,codigo-area)
        // createPort(numero-puerto,nombre-corto-operador-puerto)
        
        cdm.createOperator("movilnet","CANTV Movilnet",58,416);
        cdm.createOperator("telcel","Telcel Telefonica",58,414);
        cdm.createOperator("digitel","Digitel TIM",58,412);
        
        
        cdm.createPort("22625","movilnet"); 	//canal
        cdm.createPort("22625","telcel");   	//canal
        cdm.createPort("22625","digitel");  	//canal
        
        cdm.createPort("28467","movilnet"); 	//avior
        cdm.createPort("28467","telcel");		//avior
        cdm.createPort("28467","digitel");	//avior
        
        cdm.createPort("8751","movilnet"); 	//tsj1
        cdm.createPort("8751","telcel");		//tsj1
        cdm.createPort("8751","digitel");		//tsj1
        
        cdm.createPort("631","movilnet"); 	//noche digital
        cdm.createPort("631","telcel");		//noche digital
        
        cdm.createPort("9853","movilnet"); 	//conredsis
        cdm.createPort("9853","telcel");		//conredsis
        cdm.createPort("9853","digitel");		//conredsis
        
        
        // Canales
        //createChannel(alias,numero,subcanal,pasaporte)
        //addPort2Channel(canal, numero puerto, nombre-corto-operador-puerto)
        
        cdm.createChannel("canal","22625","","cesar");      
        cdm.addPort2Channel("22625","22625","movilnet");
        cdm.addPort2Channel("22625","22625","telcel");
        cdm.addPort2Channel("22625","22625","digitel");
        
        cdm.createChannel("multi","22625","multi","multinacional");
        cdm.createChannel("bnc", "22625", "bnc", "bnc");
	    cdm.createChannel("bancar","22625","bancar","bancar");
        cdm.createChannel("zoom", "22625", "zoom", "zoom");
        cdm.createChannel("seghz", "22625", "seghz", "seghz");
        cdm.createChannel("mc", "22625", "mc", "mc");
        cdm.createChannel("yesi", "22625", "yesi", "yesi");
        cdm.createChannel("segmer", "22625", "segmer", "segmer");       
        	      
      
        cdm.createChannel("avior","28467","","avior");      
        cdm.addPort2Channel("28467","28467","movilnet");
        cdm.addPort2Channel("28467","28467","telcel");
        cdm.addPort2Channel("28467","28467","digitel");
        
        cdm.createChannel("conredsis","9853","","conredsis");      
        cdm.addPort2Channel("9853","9853","movilnet");
        cdm.addPort2Channel("9853","9853","telcel");
        cdm.addPort2Channel("9853","9853","digitel");
        
        cdm.createChannel("noche digital","631","","nochedigital");      
        cdm.addPort2Channel("631","631","movilnet");
        cdm.addPort2Channel("631","631","telcel");
    

        
        
        
        System.out.println("Carga inicial finalizada con exito.");

        }
        catch(Exception e){
            System.out.println("Hubo un error:"+e);
            e.printStackTrace();

        }
    }
    
*/
}
